package com.blue.dto.workflow;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 流程节点表
 *
 * @author nanjie.chen
 * @email 15696471158@163.com
 * @date 2025-03-07
 */
@Data
@TableName("workflow_node")
public class NodeDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "流程节点ID")
    private String id;

    @Schema(description = "流程定义ID")
    private String definitionId;

    @Schema(description = "节点名称")
    private String nodeNm;

    @Schema(description = "流程节点类型(0-开始节点,1-中间节点,2-结束节点)")
    private String nodeType;

    @Schema(description = "多人审批方式(0-或签(只需一名审批人同意或拒绝即可),1-会签(需要所有审批人同意，不限顺序))")
    private String multiType;

    @Schema(description = "节点审批类型(0-自选审批人,1-非自选审批人)")
    private String approvalType;

    @Schema(description = "处理人类型(0-user,1-role+dept,2-role,3-dept,4-leader,5-self)")
    private String assigneeType;

    @Schema(description = "处理人值(userId/roleId/deptId)")
    private String assigneeValue;

    @Schema(description = "退回策略(0-退回到第一节点/1-退回到上一节点)")
    private String backStrategy;

    @Schema(description = "父级节点ID")
    private String parentNodeId;

    @Schema(description = "最外层节点ID(指网关节点)")
    private String outNodeId;

    @Schema(description = "条件节点")
    private List<NodeDTO> conditionNodes;

    @Schema(description = "子节点")
    private NodeDTO childNode;

    @Schema(description = "节点条件")
    private List<NodeConditionDTO> nodeConditions;

    @Schema(description = "前端节点ID")
    private String nodeId;

    @Schema(description = "操作按钮权限(0-同意,1-拒绝,2-退回,3-转办)")
    private String operationButton;


}
